package com.ac.scum.log.web.model.ftp.controller;

import com.ac.common.core.exception.BaseException;
import com.ac.common.core.result.Result;
import com.ac.scum.log.web.model.ftp.controller.vo.LogVO;
import com.ac.scum.log.web.model.ftp.service.ServerFTPFileLogService;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;

/**
 * 服务器FTP日志
 */
@RestController
@RequestMapping("server/ftp/file/log")
@AllArgsConstructor
public class ServerFTPFileLogController {
    private final ServerFTPFileLogService serverFTPFileLogService;

    @PostMapping("page/{current}/{size}")
    public Result<Object> getLogPage(@PathVariable("current") Integer current, @PathVariable("size") Integer size, @RequestBody LogVO logVO) throws BaseException {
        return Result.ok(serverFTPFileLogService.findPageByStage(current, size, logVO));
    }
}
